package com.ecoolex.hotel.saas.enums;

import com.ecoolex.framework.common.EnumInterface;
import com.ecoolex.framework.common.util.Check;

/**
 * 组织机构代码证有效期类型
 * @author admin
 *
 */
public enum StoreOrganizationCodeValidity implements EnumInterface<StoreOrganizationCodeValidity, Integer> {
	LONG_TERM_VALIDITY(1, "长期有效"), 
	NON_LONG_TERM_VALIDITY(2, "非长期有效");

	private int real;

	private String describe;

	private StoreOrganizationCodeValidity(int real, String describe) {
		this.real = real;
		this.describe = describe;
	}

	@Override
	public Integer real() {
		return real;
	}

	@Override
	public String describe() {
		return describe;
	}

	@Override
	public StoreOrganizationCodeValidity realOf(Integer real) {
		if (Check.notNull(real)) {
			for (StoreOrganizationCodeValidity v : values()) {
				if (v.real().equals(real)) {
					return v;
				}
			}
		}
		return null;
	}
}
